package com.mind.system.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.mind.common.annotation.Excel;
import com.mind.common.utils.StringUtils;
import lombok.Data;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import java.util.List;


/**
 * 规则复核(AjRuleCheck)
 *
 * @author makejava
 * @since 2024-12-13 10:28:39
 */
@Data
public class AjRuleCheck implements Serializable {
    /**
     * 主键
     */     
    @ExcelIgnore
    private Integer id;
    /**
     * 规则id
     */     
    @Excel(name = "规则id")
    @ExcelProperty("规则id")
    private Integer ruleId;
    /**
     * 规则明细id
     */     
    @Excel(name = "规则明细id")
    @ExcelProperty("规则明细id")
    private Long ruleDetailId;
    /**
     * 规则明细名称
     */     
    @Excel(name = "规则明细名称")
    @ExcelProperty("规则明细名称")
    private String ruleDetailName;
    /**
     * 业务小类
     */     
    @Excel(name = "业务小类")
    @ExcelProperty("业务小类")
    private String businessCate;
    /**
     * 业务小类名称
     */     
    @Excel(name = "业务小类名称")
    @ExcelProperty("业务小类名称")
    private String businessCateName;
    /**
     * 单据类型
     */     
    @Excel(name = "单据类型")
    @ExcelProperty("单据类型")
    private String ticketType;
    /**
     * 单据类型名称
     */     
    @Excel(name = "单据类型名称")
    @ExcelProperty("单据类型名称")
    private String ticketTypeName;
    /**
     * 业务组别
     */     
    @Excel(name = "业务组别")
    @ExcelProperty("业务组别")
    private String businessGroup;
    /**
     * 查验节点
     */     
    @Excel(name = "查验节点")
    @ExcelProperty("查验节点")
    private String checkPoint;
    /**
     * 风险等级
     */     
    @Excel(name = "风险等级")
    @ExcelProperty("风险等级")
    private Integer riskLevel;
    /**
     * 生效日期
     */     
    @Excel(name = "生效日期")
    @ExcelProperty("生效日期")
    private Date activeDate;
    /**
     * 失效日期
     */     
    @Excel(name = "失效日期")
    @ExcelProperty("失效日期")
    private Date expireDate;
    /**
     * 组织ID
     */     
    @Excel(name = "组织ID")
    @ExcelProperty("组织ID")
    private String orgIds;
    /**
     * 版本
     */     
    @Excel(name = "版本")
    @ExcelProperty("版本")
    private String version;
    /**
     * 规则配置名称
     */     
    @Excel(name = "规则配置名称")
    @ExcelProperty("规则配置名称")
    private String name;
    /**
     * 状态 1 暂存 2 审核中 3通过 4 驳回
     */     
    @Excel(name = "状态 1 暂存 2 审核中 3通过 4 驳回")
    @ExcelProperty("状态 1 暂存 2 复核中 3通过 4 驳回 5 失效复核中")
    private String status;

    @TableField(exist = false)
    private String statusNames;

    @TableField(exist = false)
    private List<String> statusList;

    private List<String> getStatusList() {
        if(StringUtils.isEmpty(statusNames)){
            return null;
        }else{
            return Arrays.asList(statusNames.split(","));
        }
    }

    private String uuid;
    /**
     * 创建时间
     */     
    @ExcelIgnore
    private Date createTime;
    /**
     * 修改时间
     */     
    @ExcelIgnore
    private Date updateTime;
         
    @Excel(name = "${column.comment}")
    @ExcelProperty("${column.comment}")
    private Integer submitorId;
         
    @Excel(name = "${column.comment}")
    @ExcelProperty("${column.comment}")
    private String submitor;
         
    @Excel(name = "${column.comment}")
    @ExcelProperty("${column.comment}")
    private Integer checkorId;
         
    @Excel(name = "${column.comment}")
    @ExcelProperty("${column.comment}")
    private String checkor;
    /**
     * 提交时间
     */     
    @Excel(name = "提交时间")
    @ExcelProperty("提交时间")
    private Date submitTime;
    /**
     * 复核时间
     */     
    @Excel(name = "复核时间")
    @ExcelProperty("复核时间")
    private Date checkTime;
    /**
     * 描述
     */     
    @Excel(name = "描述")
    @ExcelProperty("描述")
    private String ruleDetailDesc;
    /**
     * 附件类型
     */     
    @Excel(name = "附件类型")
    @ExcelProperty("附件类型")
    private String ruleDetailAttachCate;
    /**
     * 规则集
     */     
    @Excel(name = "规则集")
    @ExcelProperty("规则集")
    private String ruleDetailRuleGroup;
    /**
     * 规则编码
     */     
    @Excel(name = "规则编码")
    @ExcelProperty("规则编码")
    private String ruleDetailCode;
    /**
     * 告警信息
     */     
    @Excel(name = "告警信息")
    @ExcelProperty("告警信息")
    private String ruleDetailAlert;
    /**
     * 编辑器
     */     
    @Excel(name = "编辑器")
    @ExcelProperty("编辑器")
    private String ruleDetailEditor;
    /**
     * 业务组别
     */     
    @Excel(name = "业务组别")
    @ExcelProperty("业务组别")
    private String ruleDetailBusinessGroup;

    private String remark;

    private Integer newRuleId;

    private Integer isActive;
    private String ruleStatus;

//    private start
}

